using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace QuanLyNganHangDe.DAL.Models.Mapping
{
    public class NamHocMap : EntityTypeConfiguration<NamHoc>
    {
        public NamHocMap()
        {
            // Primary Key
            this.HasKey(t => t.NamHoc1);

            // Properties
            this.Property(t => t.NamHoc1)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("NamHoc");
            this.Property(t => t.NamHoc1).HasColumnName("NamHoc");
        }
    }
}
